<include file="Public:head" />
<link href="__APP__/Application/{$Think.MODULE_NAME}/Public/css/home.css" rel="stylesheet" type="text/css" />
<style>
    #personalPwd label.error{width:auto;font-size: 12px;}
</style>
<script src="__PUBLIC__/js/jquery/validate.js"></script>
<script type="text/javascript">
   
    $(function(){
        $("#form").validate({
            errorPlacement: function(error, element){
                var error_td = element.parent('li');
                error_td.append(error).show();
                error_td.find('p.focusTips').remove();
            },
            rules : {
                pwdOld : {
                    required : true,
                    remote   : {
                        url :"{:U('Ajax/checkPwd')}",
                        type: 'post',
                        data:{
                            mobile : function(){
                                return $('#pwdOld').val();
                            }
                        }
                    }
                },
                pwd : {
                    required : true,
                    minlength: 6,
                    maxlength: 20
                },
                pwd2 : {
                    required : true,
                    equalTo  : '#pwd'
                }
            },
            messages : {
                pwdOld : {
                    required : '请输入原密码！',
                    remote	 : '原密码不正确！'
                },
                pwd  : {
                    required : '密码不能为空',
                    minlength: '密码长度应在6-20个字符之间',
                    maxlength: '密码长度应在6-20个字符之间'
                },
                pwd2 : {
                    required : '请再次输入您的密码',
                    equalTo  : '两次输入的密码不一致'
                }
                
            }
        });
    });
</script>
<div id="wrap">
    <div id="school">{$type=0|getAreaName}
        <a href="__APP__/?type=clean">[切换位置]</a>
        <span>/</span>
        <em>密码修改</em>
    </div>
    <!--end of header-->
    <div id="container" class="clearfix">
        <div class="shadow clearfix" id="pCenter">
            <include file="Public:left" />
            <form id="form" name="form" method="post"  action="__URL__/pwd_post">
                <div id="pAccount">
                    <div id="ChgPwd" class="acc_con">
                        <p class="ac_title">密码修改</p>
                        <div id="personalPwd" class="ac_content">
                            <ul>
                                <li>
                                    <label>当前密码：</label>
                                    <input type="password" name="pwdOld" id="pwdOld" maxlength="20" >
                                    <p class="focusTips">请输入当前密码</p>
                                </li>
                                <li>
                                    <label>
                                        新密码：</label>
                                    <input type="password" name="pwd" id="pwd" maxlength="20" ><p class="focusTips">
                                        密码不能为空，且不能少于6个字符</p>
                                </li>
                                <li>
                                    <label>确认新密码：</label>
                                    <input type="password" name="pwd2" maxlength="20">
                                </li>
                                <li>
                                    <input type="submit" id="btnSubmit" value="确认修改" />
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </form>
            <!--end of pAccount-->
        </div>
        <!--end of pCenter -->
    </div>
    <include file="Public:foot" />